home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / catD / physiock.z / physiock
Encoding:
Text File  |  2002-10-03  |  7.6 KB  |  132 lines

  1.  
  2.  
  3.  
  4. pppphhhhyyyyssssiiiioooocccckkkk((((DDDD3333))))                                                      pppphhhhyyyyssssiiiioooocccckkkk((((DDDD3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk - validate and issue a raw I/O request
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_bbbb_uuuu_ffff_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_uuuu_iiii_oooo_...._hhhh_>>>>
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  16.      _iiii_nnnn_tttt _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk_((((_vvvv_oooo_iiii_dddd _((((_****_s_t_r_a_t_))))_((((_))))_,,,, _bbbb_uuuu_ffff______tttt _****_b_p_,,,, _dddd_eeee_vvvv______tttt _d_e_v_,,,, _iiii_nnnn_tttt _r_w_f_l_a_g_,,,,
  17.           _dddd_aaaa_dddd_dddd_rrrr______tttt _n_b_l_o_c_k_s_,,,, _uuuu_iiii_oooo______tttt _****_u_i_o_p_))))_;;;;
  18.  
  19.    AAAArrrrgggguuuummmmeeeennnnttttssss
  20.      _s_t_r_a_t     Address of the driver _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2) routine, or similar
  21.                function.
  22.      _b_p        Pointer to the _bbbb_uuuu_ffff(D4) structure describing the I/O request.
  23.      _d_e_v       External device number.
  24.      _r_w_f_l_a_g    Flag indicating whether the access is a read or a write.
  25.      _n_b_l_o_c_k_s   Number of blocks that the logical device _d_e_v can support.
  26.      _u_i_o_p      Pointer to the _uuuu_iiii_oooo(D4) structure that defines the user space of
  27.                the I/O request.
  28.  
  29. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.      _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk is called by the character interface _iiii_oooo_cccc_tttt_llll(D2), _rrrr_eeee_aaaa_dddd(D2), and
  31.      _wwww_rrrr_iiii_tttt_eeee(D2) routines of block drivers to help perform unbuffered I/O while
  32.      maintaining the buffer header as the interface structure.
  33.  
  34.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  35.      _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk returns 0 if the result is successful, or the appropriate error
  36.      number on failure.  If a partial transfer occurs, the _uuuu_iiii_oooo structure is
  37.      updated to indicate the amount not transferred and an error is returned.
  38.      If a read is performed at the end of the device, 0 is returned.
  39.  
  40.      _EEEE_NNNN_OOOO_SSSS_PPPP_CCCC
  41.           An attempt is made to read beyond the end of the device.
  42.  
  43.      _EEEE_NNNN_OOOO_SSSS_PPPP_CCCC
  44.           An attempt is made to write at or beyond the end of the device.
  45.  
  46.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT
  47.           The user memory is not valid.
  48.  
  49.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN
  50.           _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk could not lock all of the pages.
  51.  
  52.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL
  53.           The offset is not a multiple of NBPSCTR.
  54.  
  55.      _EEEE_BBBB_UUUU_SSSS_YYYY
  56.           There is not enough kernel memory available to map the user pages to
  57.           kernel virtual memory.
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. pppphhhhyyyyssssiiiioooocccckkkk((((DDDD3333))))                                                      pppphhhhyyyyssssiiiioooocccckkkk((((DDDD3333))))
  69.  
  70.  
  71.  
  72. UUUUSSSSAAAAGGGGEEEE
  73.      _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk performs the following functions:
  74.  
  75.           verifies the requested transfer is valid by checking if the offset
  76.           is at or past the end of the device (this check is bypassed if the
  77.           size parameter argument _nnnn_bbbb_llll_oooo_cccc_kkkk_ssss is zero) and that the offset is a
  78.           multiple of NBPSCTR
  79.  
  80.           sets up a buffer header describing the transfer
  81.  
  82.           faults pages in and locks the pages impacted by the I/O transfer so
  83.           they can't be swapped out
  84.  
  85.           calls the driver _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine passed to it (_s_t_r_a_t)
  86.  
  87.           sleeps until the transfer is complete and is awakened by a call to
  88.           _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3) from the driver's I/O completion handler
  89.  
  90.           performs the necessary cleanup and updates, then returns to the
  91.           driver routine
  92.  
  93.      A transfer using _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk is considered valid if the specified data
  94.      location exists on the device, and the user has specified a storage area
  95.      large enough that exists in user memory space.
  96.  
  97.      If _b_p is set to _NNNN_UUUU_LLLL_LLLL, a buffer is allocated temporarily and freed after
  98.      the transfer completes.
  99.  
  100.      If _r_w_f_l_a_g is set to _BBBB______RRRR_EEEE_AAAA_DDDD, the direction of the data transfer will be
  101.      from the kernel to the user's buffer.  If _r_w_f_l_a_g is set to _BBBB______WWWW_RRRR_IIII_TTTT_EEEE, the
  102.      direction of the data transfer will be from the user's buffer to the
  103.      kernel.
  104.  
  105.      One block is equal to _NNNN_BBBB_PPPP_SSSS_CCCC_TTTT_RRRR bytes.  _NNNN_BBBB_PPPP_SSSS_CCCC_TTTT_RRRR is defined in _ssss_yyyy_ssss_////_pppp_aaaa_rrrr_aaaa_mmmm_...._hhhh.
  106.  
  107.    LLLLeeeevvvveeeellll
  108.      Base only.
  109.  
  110.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  111.      Can sleep.
  112.  
  113.      Driver-defined basic locks and read/write locks may not be held across
  114.      calls to this function.
  115.  
  116.      Driver-defined sleep locks may be held across calls to this function.
  117.  
  118. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  119.      _bbbb_uuuu_ffff(D4), _iiii_oooo_cccc_tttt_llll(D2), _rrrr_eeee_aaaa_dddd(D2), _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2), _uuuu_iiii_oooo(D4), _wwww_rrrr_iiii_tttt_eeee(D2),
  120.      _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo(D3X)
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.